// -*- C++ -*-
//
//  This file is part of CBNSIM, the Content-Based Networking
//  Simulation Library.
//
//  Authors: See the file AUTHORS for full details.
//
//  Copyright (C) 2002-2004 University of Colorado
//
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
//  USA, or send email to serl@cs.colorado.edu.
//
// $Id: MatchHandler.cc,v 1.2 2004/01/08 07:01:50 rutherfo Exp $
//
#include "cbnsim/MatchHandler.h"
#include <stdio.h>

using namespace cbnsim;
using namespace std;
using siena::if_t;

MatchHandler :: MatchHandler()
{
}

MatchHandler :: MatchHandler( const MatchHandler& mh )
  : m_ids( mh.m_ids )
{
}

MatchHandler :: ~MatchHandler()
{
}

const MatchHandler& MatchHandler :: operator= ( const MatchHandler& mh )
{
  m_ids = mh.m_ids;
  return *this;
}

bool MatchHandler :: empty() const
{
  return m_ids.empty();
}

const set<if_t>& MatchHandler :: getIds() const
{
  return m_ids;
}

bool MatchHandler :: output( if_t id ) throw ()
{
  m_ids.insert( id );
  return false;
}
